package com.bitongchong.test;

public class Demo {
	static volatile Boolean flage;
	static volatile int a;

	static class ReadThread extends Thread {
		@Override
		public void run() {
			while(!flage) {
				Thread.yield();
			}
			System.out.println("循环");
			System.out.println(flage);
		}
	}

	public static void main(String[] args) throws InterruptedException {
		new ReadThread().start();
		flage = true;
		a = 666; 

	}
}
